import { getUserProfile } from '@/api/user';
import * as types from '../actionTypes/userTypes';
export const getUserInfo = () => {
  return async dispatch => {
    const res = await getUserProfile();
    const { data: userData, message } = res.data;
    if (message === 'OK') {
      dispatch({ type: types.USER_INFO, payload: userData });
    }
  };
};
